package com.wfs.myapp.controller.dota;

import com.wfs.myapp.common.ApiResult;
import com.wfs.myapp.service.DotaEquipService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/dota/equip")
@Api(value = "书籍", tags = "书籍")
@Slf4j
public class DotaEquipController {

    @Autowired
    private DotaEquipService dotaEquipService;

    @GetMapping("/list")
    @ApiOperation(value = "列表")
    public ApiResult<?> list(@RequestParam("storeName") String storeName) {
        return dotaEquipService.listByStoreName(storeName);
    }

    @GetMapping("/info")
    @ApiOperation(value = "详情")
    public ApiResult<?> info(@RequestParam("id") Long id) {
        return dotaEquipService.info(id);
    }

    @GetMapping("/randomOne")
    @ApiOperation(value = "随机一个")
    public ApiResult<?> randomOne() {
        return dotaEquipService.randomOne();
    }

    @GetMapping("/store/list")
    @ApiOperation(value = "商店列表")
    public ApiResult<?> storeList() {
        return dotaEquipService.storeList();
    }

    @GetMapping("/highEquip/list")
    @ApiOperation(value = "高级装备列表")
    public ApiResult<?> highEquipList() {
        return dotaEquipService.highEquipList();
    }

}
